$def with(content, page_list, total, lastpage, nextpage, typeL1=None, typeL2=None)
$:render.header(typeL1, typeL2)
<div class="box">
    <table id="resource" class="minibox" style="table-layout:fixed">
        <thead id="theader">
            <tr>
                <th class="resource_name">资源名称</th>
                <th class="typeL1">分类</th>
                <th class="typeL2">二级分类</th>
                <th class="magnet">链接</th>
                <th class="size">资源大小</th>
                <th class="info">信息</th>
                <th class="score">评分</th>
            </tr>
        </thead>
        <tbody id="tbody">
            $for items in content:
            <tr class="resourceitem">
                <td class="resource_name" id="$items.get('resource_id')" style="text-overflow:ellipsis; overflow: hidden; " >$:items.get('resource_name')</td>
                <td class="typeL1"><a href="/tpbtop/$items.get('typeL1')">$items.get('typeL1')<a></td>
                <td class="typeL2"><a href="/tpbtop/$items.get('typeL1')/$items.get('typeL2')">$items.get('typeL2')</a></td>
                <td ><a class="magDown" href="$items.get('magnet')"><img src="/static/images/download.gif" alt="下载"></a></td>
                <td class="size">$items.get('size')</td>
                $if items.get('extern_info') == 'True': <td class="info" align="center" valign="middle"><a href="/resourceinfoid/$items.get('resource_info_id')" target="blank"><img src="/static/images/extern_info_true.gif" alt="详细信息"></a></td>
                $else: <td class="info" align="center" valign="middle"><img src="/static/images/extern_info_false.gif"></td>
                <td class="scoretd">
                <p class="score">
                    <a id="diglikeid" onclick="LikeAjaxFunction(this); return false;" rel="nofollow" href="#" class="dig like float_left" title="这个资源不错，我顶">顶+$items.get('score_like')</a>
                    <a id="digburyid" onclick="BuryAjaxFunction(this); return false;" rel="nofollow" href="#" class="dig bury float_right" title="这个资源太烂了，我踩">踩+$items.get('score_bury')</a>
                    <span style="visibility:hidden">$items.get('resource_id')</span>
                </p></td>
            </tr>
        </tbody>
    </table>
    <!-- 页码 -->
    $if page_list:
    <div id="navpages">
        <a href="?page=1">第一页</a>
        $if  lastpage > 1 : <!-- 防止出现负一页 -->
        <a href="?page=$lastpage">上一页</a>
        $for  page in page_list: <a href="?page=$page">$page</a>
        <a href="?page=$nextpage">下一页</a>
        <a href="?page=$total">最后一页</a>
    </div>
</div>
$:render.foot() 